package com.sword.ms_bwk;

import com.sword.ms_bwk.block.FurnitureBlock;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(modid = Utils.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ClientRegister {

    @SubscribeEvent
    public static void registerRenderers(final EntityRenderersEvent.RegisterRenderers event) {
        for (FurnitureBlock temp: FurnitureBlock.furnitureList) {
            event.registerBlockEntityRenderer(temp.blockEntity.get(), blockEntityRendererProvider -> temp.new Renderer(blockEntityRendererProvider));
        }
    }
}
